package org.example.service.impl;

import org.example.mapper.OrderMapper;
import org.example.pojo.Door;
import org.example.pojo.Order;
import org.example.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;


    @Override
    public List<Order> getAllOrder() {
        return orderMapper.getAllOrder();
    }

    @Override
    public void addOrder(Order order) {
        orderMapper.addOrder(order);
    }

    @Override
    public void deleteOrder(Integer id) {
        orderMapper.deleteOrder(id);
    }

    @Override
    public Order getOrder(Integer id) {
        return orderMapper.getOrder(id);
    }

    @Override
    public void update(Order order) {
        orderMapper.update(order);
    }
}
